@extends('layouts.mobile_main')

@section('title', 'app下载')

@section('resources')
    @parent
    <link rel="stylesheet" href="{{ env('CSS_DOMAIN') }}/css/public.css?v={{env('CSS_VERSION')}}">
    <script src="{{ env('JS_DOMAIN') }}/js/adaptation.js?v={{env('JS_VERSION')}}"></script>
    <style>
        .pic{width: 100%;position: absolute;top: 0;left: 0;}
        .pic_down{width: 100%;position: fixed;bottom: 0;left: 0;}
        .down{position: fixed;bottom: 1.5rem;left: 50%;width: 7rem;height: 1.2rem;line-height: 1.2rem;text-align: center;margin-left: -3.5rem;background-color: #fff;border-radius: 0.2rem;}
        .back{width: 0.6rem;height: 0.6rem;position: absolute;top: 0;left: 0;}
        .backa{width: 0.6rem;height: 0.6rem;position: absolute;top: 0.8rem;left: 0.6rem;z-index: 1;}
        .down_mark{width: 100%;position: fixed;top: 0;left: 0;background: rgba(62,58,57,0.8);z-index: 10;display: none;}
        .down_mark p{width: 100%;height: 0.3rem;background: #393a3e;}
        .down_mark img{position: absolute;top: 0;left: 0;width: 10.8rem;height: 3.4rem;}
    </style>
@endsection

@section('content')
    <div class="down_mark">
        <p></p>
        <img src="{{env('IMAGE_DOMAIN')}}images/shop/arrow.png?v={{env('IMAGE_VERSION')}}" alt="">
    </div>
    @if($platform == 'web')
    <a class="backa" href="javascript:history.go(-1);"><img class="back" src="{{env('IMAGE_DOMAIN')}}/images/shop_back.png?v={{env('IMAGE_VERSION')}}" alt=""></a>
    @endif
    <img class="pic" src="{{env('IMAGE_DOMAIN')}}/images/download_app.jpg?v={{env('IMAGE_VERSION')}}" alt="">
    <img class="pic_down" src="{{env('IMAGE_DOMAIN')}}/images/download_app.png?v={{env('IMAGE_VERSION')}}" alt="">
        @if($isweixin == 1)
            <p class="down fz_50 co_violet">App下载</p>
        @else
            @if($platform == 'iOS')
                <a class="down fz_50 co_violet" href="https://itunes.apple.com/cn/app/id1172353317">App下载</a>
            @elseif($platform == 'Android')
                <a class="down fz_50 co_violet" href="http://file.fbw-china.com/download/fbw.apk">App下载</a>
            @else
                <a class="down fz_50 co_violet" href="http://file.fbw-china.com/download/fbw.apk">App下载</a>
            @endif
        @endif
@endsection

@section('scriptResources')
    @parent
    <script>
        var confirm = '1'; //TODO
	    window.onresize=function(){
		    pagesp();
	    }
	    $(function(){
		    var paysu_outer_h=$(window).height();
		    $(".paysu_outer").css({"min-height":paysu_outer_h});
	    })
        var isweixin = '{{$isweixin}}'; //‘1’表示微信，‘0’表示不是微信
        var wheight = $(window).height();
        window.onresize=function(){
            pagesp();
            wheight = $(window).height();
        }
        $(function(){
            if (isweixin == '1') {
                $('.down').click(function(){
                    $('.down_mark').height(wheight);
                    $('.down_mark').show();
                });
            }
            var paysu_outer_h=$(window).height();
            $(".paysu_outer").css({"min-height":paysu_outer_h});
        })
    </script>
@endsection